package com.lms.logistics_management_system.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@NoArgsConstructor  //自动创建无参构造
@AllArgsConstructor //自动创建有参构造
//mybatis-plus会直接去数据库中查找，名字必须一致或者用tablename
@TableName(value = "department")
@ToString
public class Department {
    @TableId(type = IdType.AUTO)
    @TableField(value = "department_id")
    private Integer departmentId;

    @Alias("商品名称")
    @TableField(value = "department_name")
    private String departmentName;
}
